﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SlidingPuzzle
{
    class Node
    {
        private int[] data;
        private Node parent;
        private int depth;
        private int heuristic;

        public Node(int[] data, Node parent, int heuristic, int depth)
        {
            this.parent = parent;
            this.data = data;
            this.heuristic = heuristic;
            this.depth = depth;
        }

        public int Depth
        {
            get { return depth; }
            set { depth = value; }
        }

        public int[] Data
        {
            get { return data; }
        }
        public Node Parent
        {
            get { return parent; }
        }


        public override bool Equals(object obj)
        {
            if (!(obj is Node))
            {
                return false;
            }

            for (int x = 0; x < data.Length; x++)
            {
                if ((obj as Node).Data[x] != data[x])
                {
                    return false;
                }
            }

            return true;
        }
    }
}